// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: taekwon

#include <execinfo.h>
#include <gflags/gflags.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>

#include "coin2/exchange/base/executor/live_executor.h"
#include "coin2/exchange/okex_futures/order_v3/subsystem.h"
#include "coin2/exchange/okex_futures/symbology/product.h"

DEFINE_string(key_filepath, "view/xunke12/OKEx/view_v3_key.json", "key_filepath");

int main(int argc, char* argv[]) {
  /*
  google::InitGoogleLogging(argv[0]);
  gflags::ParseCommandLineFlags(&argc, &argv, true);

  Strategy strat;
  LiveAsyncExecutor ass{1};

  OrderSubsystemConfig oss_config;
  oss_config.set_key_filepath(FLAGS_key_filepath);
  auto connection_config = oss_config.mutable_connection_config();
  connection_config->set_key_filepath(FLAGS_key_filepath);
  auto priv_sc_config = oss_config.mutable_private_subscriber_config();
  priv_sc_config->set_query_open_orders_period_sec(3);
  priv_sc_config->set_query_account_balance_period_sec(3);
  priv_sc_config->set_query_account_position_period_sec(3);

  int64_t resolve_timestamp = GetCurrentTimestamp();
  OkexFuturesOrderSubsystem oss(oss_config, &ass);
  using OkexFuturesProduct = coin2::exchange::okex_futures::symbology::OkexFuturesProduct;
  auto btc_product = OkexFuturesProduct::FromStr("BTC-USD.QUARTER", resolve_timestamp);
  auto eth_product = OkexFuturesProduct::FromStr("ETH-USD.QUARTER", resolve_timestamp);
  oss.AddNativeSymbol(btc_product.order_native_symbol(), &strat);
  oss.AddNativeSymbol(eth_product.order_native_symbol(), &strat);

  strat.SetGateway(oss.gateway());

  ass.Run();
  */

  return 0;
}
